google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(function(){ var data = new google.visualization.DataTable(); data.addColumn('string', '日'); data.addColumn('number', '推測'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addColumn('number', '推測'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addColumn('number', 'iOS前月'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addColumn('number', 'iOS当月'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addRows([ ['1日',null,null,null,null,null,null,163,null,null,340,null,null], ['2日',null,null,null,null,null,null,290,null,null,326,null,null], ['3日',null,null,null,null,null,null,358,'UP!','【復刻】2017Bitter or Sweet ♥想いが溶け合うバレンタイン&2018 届け本命ショコラの魔法: 02/03 → 02/10',416,'UP!','【復刻】2017Sugar or Spice♥想いが溢れるホワイトデー&2018彼をご指名 危険な夜と甘い誘惑: 03/03 → 03/09'], ['4日',null,null,null,null,null,null,187,null,null,94,null,null], ['5日',null,null,null,null,null,null,184,null,null,120,null,null], ['6日',null,null,null,null,null,null,170,null,null,128,null,null], ['7日',null,null,null,null,null,null,179,null,null,180,null,null], ['8日',null,null,null,null,null,null,228,null,null,220,null,null], ['9日',null,null,null,null,null,null,245,null,null,267,'UP!','ちょっと一息♡憩いのWhite Holiday: 03/09 → 03/19'], ['10日',null,null,null,null,null,null,258,null,null,128,null,null], ['11日',null,null,null,null,null,null,298,null,null,141,null,null], ['12日',null,null,null,null,null,null,560,'UP!','ホカホカ♡湯けむり冬の旅: 02/12 → 02/19',169,null,null], ['13日',null,null,null,null,null,null,378,null,null,227,null,null], ['14日',null,null,null,null,null,null,260,'UP!','プレミアムバレンタインガチャ: 02/14 → 02/21',188,'UP!','可愛ひかるBD2020: 03/14 → 03/15'], ['15日',null,null,null,null,null,null,71,null,null,168,'UP!','ヒーローズコレクションガチャ: 03/15 → 03/18'], ['16日',null,null,null,null,null,null,117,null,null,241,null,null], ['17日',null,null,null,null,null,null,207,'UP!','スタンドアップ解放記念ガチャ: 02/17 → 02/21',304,null,null], ['18日',null,null,null,null,null,null,204,null,null,263,null,null], ['19日',null,null,null,null,null,null,238,null,null,232,'UP!','2020SPRINGスタマイパーティ: 03/19 → 03/23'], ['20日',null,null,null,null,null,null,314,null,null,54,null,null], ['21日',null,null,null,null,null,null,336,'UP!','Case File:研究対象Sの記録(捜査イベガチャ): 02/21 → 03/02',63,null,null], ['22日',null,null,null,null,null,null,116,null,null,112,null,null], ['23日',null,null,null,null,null,null,189,null,null,129,'UP!','Black or White ウソとホントのHideout: 03/23 → 04/01'], ['24日',null,null,null,null,null,null,246,null,null,63,null,null], ['25日',null,null,null,null,null,null,318,null,null,103,null,null], ['26日',null,null,null,null,null,null,238,null,null,160,null,null], ['27日',null,null,null,null,null,null,191,null,null,190,null,null], ['28日',null,null,null,null,null,null,250,null,null,246,null,null], ['29日',null,null,null,null,null,null,310,null,null,325,null,null], ['30日',null,null,null,null,null,null,null,null,null,286,null,null], ['31日',null,null,null,null,null,null,null,null,null,251,null,null] ]); var options = { chartArea: {'width':'85%', 'height':'65%', 'left':60 }, 'pointSize': 3, hAxis: { titleTextStyle:{italic:false}, format:'#',ticks: [1,5,10,15,20,25,30] }, vAxis: { title:'2020年3月ランキング', titleTextStyle:{italic:false}, format:'#',viewWindow:{min:0,max:600},direction:-1 }, legend: {position: 'top' }, tooltip: { trigger: 'both' }, focusTarget: 'category', colors:['skyblue','pink','#2980b9','#e74c3c'] }; var chart = new google.visualization.LineChart(document.getElementById('graphField')); chart.draw(data, options); var lastlogday=31 -1 ; var lastlogcat=10; if(lastlogday>=0){ chart.setSelection([{ row: lastlogday, column: lastlogcat }]); google.visualization.events.addListener(chart, 'click', function() { if(chart.getSelection()[0]){ //chart.setSelection(null) } }); } });